package lab03.test04;

import java.io.*;

public class Test04 {
    public static void main(String[] args)  {
        String path="D:\\hello.txt";
        String path1="E:\\hello.txt";
        BufferedReader reader=null;
        BufferedWriter writer=null;
        try {
            reader= new BufferedReader(new FileReader(path));
            writer=new BufferedWriter(new FileWriter(path1));
            String line;
            while ((line=reader.readLine())!=null){
                writer.write(line);
                writer.newLine();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                reader.close();
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
